﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Shop>" %>
<%
    int count = ViewData["Count"] != null ? (int)ViewData["Count"] : 5;
%>
<div class="widget_220 mt-15">
	<h3 ="title">商家推荐</h3>
	<div class="wd_body">
        <%foreach (var item in Model.GetRecommendGoods(count)){%>
        <div class="goods_list">
            <dl class="widget_goods">
                <dt>
                    <a href="<%=Url.Action("index", "goods", new { id = item.ID })%>">
                    <% var imgs = item.GetMajorImages();
                       if (imgs != null && imgs.Count > 0){%>
                       <img src="<%=imgs.FirstOrDefault().ImgURL%>" alt="" />
                       <%} %>
                    </a>
                </dt>
                <dd class="PName"><%=Html.ActionLink(item.Title, "index", "goods", new { id = item.ID }, null)%></dd>
                <dd class="PPrice"><span style="font-size:16px;">￥</span><%=item.Price%></dd>
            </dl>
            <div class="clear"></div>
        </div>
        <%} %>
    </div>
</div>